
/**
 * @Project : Clion_ProgrammingExercises
 * @File : 1
 * @Author : WangRuoyu 
 * @Date : 2023/5/11 10:15
 */

#include "iostream"
#include "cstring"
#include "algorithm"

using namespace std;

int main() {
    int n;
    cin >> n;

    int num[1010] = {0};

    for (int i = 0; i < n; ++i) {
        int x;
        cin >> x;
        num[x]++;
        cout << num[x] << " ";
    }

    return 0;
}